package com.zch.innerclass;
/**
 * 局部内部类
 */
public class LocalInnerClass { //外部其他类
    public static void main(String[] args) {
        Outer outer = new Outer();
        outer.m1();
    }
}

class Outer { //外部类
    private int x = 100;
    private void m2() {}

    public void m1() {
        final class Inner { //局部内部类
            public void f1() {
                System.out.println(x);
                m2();
            }
        }
        Inner inner = new Inner();
        inner.f1();
    }
}
